** Do file to replicate results for "Victory without Peace: Conquest, Insurgency, and War Termination"


use conquest_insurgency, clear

gen regression=_n
gen varname=""
gen est=.
gen estlo=.
gen esthi=.

** I first conduct the single-variable probit regressions for all relevant variables and store the results
** for use in creating figures 1 and 2.

local i=1
set more off
local siglev=.05
foreach var in terraim_s govtaim_s alldeaths_s losdeaths_s lncqsize_s soldperterr_s polity_conq_s polity_los_s terrain_s elevate_s forest_s mtnfor_s edel lndurat_s lnlosdeaths_s lnlosdeathspc_s distance_s lndist_s lngdppc_s urbpc_s culclash relclash relclash_sect language language_group_low language_group_high natl coord {
probit resist `var' if check==1, cluster(warnum)
replace varname="`var'" in `i'
mat def A=e(b)
mat def B=e(V)
replace est=A[1,1] in `i'
replace estlo=A[1,1]-invnormal(1-`siglev'/2)*sqrt(B[1,1]) in `i'
replace esthi=A[1,1]+invnormal(1-`siglev'/2)*sqrt(B[1,1]) in `i'
local i=`i'+1
}

gen type=.
replace type=1 if varname=="terraim_s" | varname=="govtaim_s" | varname=="polity_conq_s" | varname=="polity_los_s" | varname=="edel" | varname=="culclash" | varname=="lndurat_s" | varname=="lnlosdeaths_s" | varname=="lnlosdeathspc_s" | varname=="natl"
replace type=2 if varname=="lncqsize_s" | varname=="soldperterr_s" | varname=="terrain_s" | varname=="coord" | varname=="mtnfor_s" | varname=="lndist_s" | varname=="lngdppc_s" | varname=="urbpc_s"

** Now to create figure 1.

sum estlo if type==1
local boundary=abs(r(min))
sum esthi if type==1
local boundary=max(`boundary',r(max))
sort type varname
replace regression=1
replace regression=2 if varname=="govtaim_s"
replace regression=3 if varname=="lndurat_s"
replace regression=4 if varname=="lnlosdeaths_s"
replace regression=5 if varname=="lnlosdeathspc_s"
replace regression=8 if varname=="polity_los_s"
replace regression=9 if varname=="polity_conq_s"
replace regression=10 if varname=="culclash"
replace regression=6 if varname=="edel"
replace regression=7 if varname=="natl"

#del ;
scatter regression est if type==1, msymbol(d) || rcap estlo esthi regression if type==1, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(-2.5 2.5)) xlabel(-2(1)2) legend(off)
text(6.8 -2.5 "National", place(e)) text(7.2 -2.5 "Identity", place(e))
text(10 -2.48 "Cultural/religious clash", place(e)) text(5.8 -2.5 "Common", place(e)) text(6.2 -2.5 "Threat", place(e))
text(1 -2.5 "Conqueror's territorial aims", place(e)) text(2 -2.5 "Conqueror's political aims", place(e))
text(3 -2.5 "War duration", place(e)) text(4 -2.5 "Loser's pre-conquest deaths", place(e)) 
text(4.8 -2.49 "Loser's per capita", place(e)) text(5.2 -2.49 "pre-conquest deaths", place(e))
text(8 -2.5 "Loser's Polity score", place(e))
text(9 -2.5 "Conqueror's Polity score", place(e)) ytitle("") yscale(off) ylabel(,nogrid)
;

#del cr;

** Now to create figure 2

replace type=2 if varname=="polity_conq_s"
replace regression=3 if varname=="lncqsize_s"
replace regression=4 if varname=="soldperterr_s"
replace regression=9 if varname=="polity_conq_s"
replace regression=8 if varname=="coord"
replace regression=5 if varname=="lndist_s"
replace regression=2 if varname=="mtnfor_s"
replace regression=6 if varname=="lngdppc_s"
replace regression=7 if varname=="urbpc_s"

#del ;
scatter regression est if type==2, msymbol(d) || rcap estlo esthi regression if type==2, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(-2.25 2.25)) xlabel(-2(1)2) legend(off)
text(1 -2.25 "Terrain (Degree Mountainous)", place(e)) text(2.8 -2.27 "Size of occupying", place(e))
text(3.2 -2.25 "army", place(e)) text(2 -2.25 "Terrain (Mountains/Forests)", place(e))
text(3.8 -2.25 "Density of", place(e)) text(4.2 -2.25 "occupying army", place(e))
text(9 -2.27 "Conqueror's Polity score", place(e)) text(8 -2.25 "Focal leader at large", place(e))
text(5 -2.25 "Intercapital Distance", place(e)) text(5.8 -2.25 "GDP per", place(e)) text(6.2 -2.25 "capita", place(e)) text(7 -2.25 "% Urban", place(e))
ytitle("") yscale(off) ylabel(,nogrid)
;

#del cr ;

** Replicating table 1

probit resist culclash if check==1, cluster(warnum)
eststo culture1
probit resist culclash lndist if check==1, cluster(warnum)
eststo culture2
probit resist relclash if check==1, cluster(warnum)
eststo culture3
probit resist relclash lndist if check==1, cluster(warnum)
eststo culture4
probit resist language_group_high if check==1, cluster(warnum)
eststo culture5
probit resist language_group_high lndist if check==1, cluster(warnum)
eststo culture6

esttab culture1 culture2 culture3 culture4 culture5 culture6 using resultstable.tex, tex b(a2) se l mtitles("Model 1" "Model 2" "Model 3" "Model 4") title("Cultural Difference and Distance as Predictors of Post-Conflict Resistance\label{tab-culture}") nonotes addnotes("Standard errors clustered by war. \sym{*} \(p<0.05\), \sym{**} \(p<0.01\)") replace

** Replicating table 2

lab var culclash "Cultural Clash"
lab var terraim "Territorial War Aims"
lab var lnlosdeaths "log(Pre-Conquest Deaths)"
lab var polity_conq "Conqueror's Polity Score"
lab var polity_los "Loser's Polity Score"
lab var natl "National Identity"
lab var edel "Common Threat"
lab var lndist "log(Intercapital Distance)"
gen terrain_alt=terrain/100
lab var terrain_alt "Terrain"
lab var soldperterr "Occupying Force Density"
lab var coord "Coordinating Leader"
gen gdppc2_alt=gdppc2/1000
lab var gdppc2_alt "Per Capita GDP"

reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel if default==1, cluster(warnum)
eststo model1
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist if default==1, cluster(warnum)
eststo model2
reg resist polity_conq lndist terrain_alt soldperterr gdppc2_alt coord if default==1, cluster(warnum)
eststo model3
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist terrain_alt soldperterr gdppc2_alt coord, cluster(warnum)
eststo model4

esttab model1 model2 model3 model4 using resultstable.tex, tex b(a2) se l mtitles("Model 1" "Model 2" "Model 3" "Model 4") title("Multivariate Linear Probability Regressions\label{tab_multivariate}") nonotes addnotes("Standard errors clustered by war. \sym{*} \(p<0.05\), \sym{**} \(p<0.01\)") append

** The remainder of the do file replicates the results reported in the appendices.

capture log close
log using robustness.log, replace


** Now for robustness checks -- I store these regressions in robustness.log.  To facilitate searching, robustness check is labeled 
** ROBUST_i, where i is the robustness check number
** Specific robustness checks: inclusion of marginal conquest cases from the Gleditsch wars (1), exclusion of cases in which conquest occurs in
** the opening month of fighting (2), inclusion of FIRC cases (3), exclusion of insurgency cases (4), inclusion 
** of both FIRC & insurgency cases (5), inclusion of all cases (6), default analysis excluding cases with conqflag==1 (7) or conqflag==2 (8), 
** inclusion of a control for ongoing war (9), and changing the coding for Poland in WWII to the occurrence of resistance (10)

** setup for the graphs -- I'm going to create the variables in which data will be stored

local sleeptime=0

replace est=.
replace estlo=.
replace esthi=.
replace varname=""

local i=1

foreach var in terraim govtaim lndurat lnlosdeaths lnlosdeathspc polity_conq polity_los lndist terrain mtnfor soldperterr lncqsize gdppc urbpc {
capture drop `var'_s
qui sum `var'
gen `var'_s=(`var'-r(mean))/r(sd)
replace varname="`var'_s" in `i'
local i=`i'+1
}

foreach var in culclash coord edel natl {
replace varname="`var'" in `i'
local i=`i'+1
}

replace regression=.
replace type=.
replace regression=1 if varname=="terraim_s"
replace regression=2 if varname=="govtaim_s"
replace regression=3 if varname=="lndurat_s"
replace regression=4 if varname=="lnlosdeaths_s"
replace regression=5 if varname=="lnlosdeathspc_s"
replace regression=8 if varname=="polity_los_s"
replace regression=9 if varname=="polity_conq_s"
replace regression=10 if varname=="culclash"
replace regression=6 if varname=="edel"
replace regression=7 if varname=="natl"
replace type=1 if regression!=.
replace varname="polity_conq_s" in `i'
replace regression=1 if varname=="terrain_s"
replace regression=3 if varname=="lncqsize_s"
replace regression=4 if varname=="soldperterr_s"
replace regression=9 if varname=="polity_conq_s" & regression==.
replace regression=8 if varname=="coord"
replace regression=5 if varname=="lndist_s"
replace regression=2 if varname=="mtnfor_s"
replace regression=6 if varname=="gdppc_s"
replace regression=7 if varname=="urbpc_s"
replace type=2 if regression!=. & type!=1

** ROBUST_1: First robustness to including marginal cases from the main dataset (i.e. no FIRC or insurgency cases yet)
replace default=1 if insurgency==1

*gen check=default
*replace check=1 if insurgency==0 & firc==0
replace check=default
replace check=1 if firc==0

foreach var in culclash terraim_s govtaim_s lndurat_s lnlosdeaths_s lnlosdeathspc_s polity_conq_s polity_los_s natl edel lndist_s terrain_s mtnfor_s lncqsize_s soldperterr_s coord gdppc_s urbpc_s {
probit resist `var' if check==1, cluster(warnum)
mat def A=e(b)
mat def B=e(V)
replace est=A[1,1] if varname=="`var'"
replace estlo=A[1,1]-invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
replace esthi=A[1,1]+invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
}

qui sum estlo if type==1
local boundarylo=r(min)-1
qui sum esthi if type==1
local boundaryhi=r(max)

#del ;
scatter regression est if type==1, msymbol(d) || rcap estlo esthi regression if type==1, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(6.8 `boundarylo' "National", place(e)) text(7.2 `boundarylo' "Identity", place(e))
text(10 `boundarylo' "Cultural/religious clash", place(e)) text(5.8 `boundarylo' "Common", place(e)) text(6.2 `boundarylo' "Threat", place(e))
text(1 `boundarylo' "Conqueror's territorial aims", place(e)) text(2 `boundarylo' "Conqueror's political aims", place(e))
text(3 `boundarylo' "War duration", place(e)) text(4 `boundarylo' "Loser's pre-conquest deaths", place(e)) 
text(4.8 `boundarylo' "Loser's per capita", place(e)) text(5.2 `boundarylo' "pre-conquest deaths", place(e))
text(8 `boundarylo' "Loser's Polity score", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) ytitle("") yscale(off) ylabel(,nogrid)
;
graph export robust_hm1.eps, replace;

sleep `sleeptime';

qui sum estlo if type==2;
local boundarylo=r(min)-1;
qui sum esthi if type==2;
local boundaryhi=r(max);

scatter regression est if type==2, msymbol(d) || rcap estlo esthi regression if type==2, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(1 `boundarylo' "Terrain (Degree Mountainous)", place(e)) text(2.8 `boundarylo' "Size of occupying", place(e))
text(3.2 `boundarylo' "army", place(e)) text(2 `boundarylo' "Terrain (Mountains/Forests)", place(e))
text(3.8 `boundarylo' "Density of", place(e)) text(4.2 `boundarylo' "occupying army", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) text(8 `boundarylo' "Focal leader at large", place(e))
text(5 `boundarylo' "Intercapital Distance", place(e)) text(5.8 `boundarylo' "GDP per", place(e)) 
text(6.2 `boundarylo' "capita", place(e)) text(7 `boundarylo' "% Urban", place(e))
ytitle("") yscale(off) ylabel(,nogrid)
;

#del cr ;

graph export robust_ease1.eps, replace

sleep `sleeptime'

probit resist culclash if check==1, cluster(warnum)
eststo culrobust1a
probit resist culclash lndist if check==1, cluster(warnum)
eststo culrobust1b

reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel if check==1, cluster(warnum)
eststo robust1
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist if check==1, cluster(warnum)
eststo robust2
reg resist polity_conq lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust3
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust4

esttab robust1 robust2 robust3 robust4 using appendices.tex, tex b(a2) se l star(* .05 ** .01) mtitles("Model 1" "Model 2" "Model 3" "Model 4") title("Including Marginal Conquest Cases from COW Wars\label{tab-robust1}") nonotes addnotes("Standard errors clustered by war. \sym{*} \(p<0.05\), \sym{**} \(p<0.01\)") replace


** ROBUST_2: Now omitting all cases in which pre-conquest war duration was less than a month

replace check=default
replace check=0 if durat<31

foreach var in culclash terraim_s govtaim_s lndurat_s lnlosdeaths_s lnlosdeathspc_s polity_conq_s polity_los_s natl edel lndist_s terrain_s mtnfor_s lncqsize_s soldperterr_s coord gdppc_s urbpc_s {
probit resist `var' if check==1, cluster(warnum)
mat def A=e(b)
mat def B=e(V)
replace est=A[1,1] if varname=="`var'"
replace estlo=A[1,1]-invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
replace esthi=A[1,1]+invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
}

qui sum estlo if type==1
local boundarylo=r(min)-1
qui sum esthi if type==1
local boundaryhi=r(max)

#del ;
scatter regression est if type==1, msymbol(d) || rcap estlo esthi regression if type==1, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(6.8 `boundarylo' "National", place(e)) text(7.2 `boundarylo' "Identity", place(e))
text(10 `boundarylo' "Cultural/religious clash", place(e)) text(5.8 `boundarylo' "Common", place(e)) text(6.2 `boundarylo' "Threat", place(e))
text(1 `boundarylo' "Conqueror's territorial aims", place(e)) text(2 `boundarylo' "Conqueror's political aims", place(e))
text(3 `boundarylo' "War duration", place(e)) text(4 `boundarylo' "Loser's pre-conquest deaths", place(e)) 
text(4.8 `boundarylo' "Loser's per capita", place(e)) text(5.2 `boundarylo' "pre-conquest deaths", place(e))
text(8 `boundarylo' "Loser's Polity score", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) ytitle("") yscale(off) ylabel(,nogrid) 
;

graph export robust_hm2.eps, replace;

sleep `sleeptime';

qui sum estlo if type==2;
local boundarylo=r(min)-1;
qui sum esthi if type==2;
local boundaryhi=r(max);

scatter regression est if type==2, msymbol(d) || rcap estlo esthi regression if type==2, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(1 `boundarylo' "Terrain (Degree Mountainous)", place(e)) text(2.8 `boundarylo' "Size of occupying", place(e))
text(3.2 `boundarylo' "army", place(e)) text(2 `boundarylo' "Terrain (Mountains/Forests)", place(e))
text(3.8 `boundarylo' "Density of", place(e)) text(4.2 `boundarylo' "occupying army", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) text(8 `boundarylo' "Focal leader at large", place(e))
text(5 `boundarylo' "Intercapital Distance", place(e)) text(5.8 `boundarylo' "GDP per", place(e)) 
text(6.2 `boundarylo' "capita", place(e)) text(7 `boundarylo' "% Urban", place(e))
ytitle("") yscale(off) ylabel(,nogrid) 
;

#del cr ;

graph export robust_ease2.eps, replace

sleep `sleeptime'

probit resist culclash if check==1, cluster(warnum)
eststo culrobust2a
probit resist culclash lndist if check==1, cluster(warnum)
eststo culrobust2b

reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel if check==1, cluster(warnum)
eststo robust1
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist if check==1, cluster(warnum)
eststo robust2
reg resist polity_conq lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust3
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust4

esttab robust1 robust2 robust3 robust4 using appendices.tex, tex b(a2) se l star(* .05 ** .01) mtitles("Model 1" "Model 2" "Model 3" "Model 4") title("Excluding Wars with Conventional Phase under One Month\label{tab-robust2}") nonotes addnotes("Standard errors clustered by war. \sym{*} \(p<0.05\), \sym{**} \(p<0.01\)") append


** ROBUST_3: Now analysis including default cases and cases from the Foreign-Imposed Regime Change dataset

replace check=default
replace check=1 if firc==1

foreach var in culclash terraim_s govtaim_s lndurat_s lnlosdeaths_s lnlosdeathspc_s polity_conq_s polity_los_s natl edel lndist_s terrain_s mtnfor_s lncqsize_s soldperterr_s coord gdppc_s urbpc_s {
probit resist `var' if check==1, cluster(warnum)
mat def A=e(b)
mat def B=e(V)
replace est=A[1,1] if varname=="`var'"
replace estlo=A[1,1]-invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
replace esthi=A[1,1]+invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
}

qui sum estlo if type==1
local boundarylo=r(min)-1
qui sum esthi if type==1
local boundaryhi=r(max)

#del ;
scatter regression est if type==1, msymbol(d) || rcap estlo esthi regression if type==1, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(6.8 `boundarylo' "National", place(e)) text(7.2 `boundarylo' "Identity", place(e))
text(10 `boundarylo' "Cultural/religious clash", place(e)) text(5.8 `boundarylo' "Common", place(e)) text(6.2 `boundarylo' "Threat", place(e))
text(1 `boundarylo' "Conqueror's territorial aims", place(e)) text(2 `boundarylo' "Conqueror's political aims", place(e))
text(3 `boundarylo' "War duration", place(e)) text(4 `boundarylo' "Loser's pre-conquest deaths", place(e)) 
text(4.8 `boundarylo' "Loser's per capita", place(e)) text(5.2 `boundarylo' "pre-conquest deaths", place(e))
text(8 `boundarylo' "Loser's Polity score", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) ytitle("") yscale(off) ylabel(,nogrid)
;

sleep `sleeptime';

graph export robust_hm3.eps, replace;

qui sum estlo if type==2;
local boundarylo=r(min)-1;
qui sum esthi if type==2;
local boundaryhi=r(max);

scatter regression est if type==2, msymbol(d) || rcap estlo esthi regression if type==2, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(1 `boundarylo' "Terrain (Degree Mountainous)", place(e)) text(2.8 `boundarylo' "Size of occupying", place(e))
text(3.2 `boundarylo' "army", place(e)) text(2 `boundarylo' "Terrain (Mountains/Forests)", place(e))
text(3.8 `boundarylo' "Density of", place(e)) text(4.2 `boundarylo' "occupying army", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) text(8 `boundarylo' "Focal leader at large", place(e))
text(5 `boundarylo' "Intercapital Distance", place(e)) text(5.8 `boundarylo' "GDP per", place(e)) 
text(6.2 `boundarylo' "capita", place(e)) text(7 `boundarylo' "% Urban", place(e))
ytitle("") yscale(off) ylabel(,nogrid)
;

#del cr ;

sleep `sleeptime'

graph export robust_ease3.eps, replace

probit resist culclash if check==1, cluster(warnum)
eststo culrobust3a
probit resist culclash lndist if check==1, cluster(warnum)
eststo culrobust3b

reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel if check==1, cluster(warnum)
eststo robust1
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist if check==1, cluster(warnum)
eststo robust2
reg resist polity_conq lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust3
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust4

esttab robust1 robust2 robust3 robust4 using appendices.tex, tex b(a2) se l star(* .05 ** .01) mtitles("Model 1" "Model 2" "Model 3" "Model 4") title("Including Marginal Cases from Foreign-Imposed Regime Change\label{tab-robust3}") nonotes addnotes("Standard errors clustered by war. \sym{*} \(p<0.05\), \sym{**} \(p<0.01\)") append


** ROBUST_4: Now default cases minus insurgency cases 

replace check=default
replace check=0 if insurgency==1

foreach var in culclash terraim_s govtaim_s lndurat_s lnlosdeaths_s lnlosdeathspc_s polity_conq_s polity_los_s natl edel lndist_s terrain_s mtnfor_s lncqsize_s soldperterr_s coord gdppc_s urbpc_s {
probit resist `var' if check==1, cluster(warnum)
mat def A=e(b)
mat def B=e(V)
replace est=A[1,1] if varname=="`var'"
replace estlo=A[1,1]-invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
replace esthi=A[1,1]+invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
}

qui sum estlo if type==1
local boundarylo=r(min)-1
qui sum esthi if type==1
local boundaryhi=r(max)

#del ;
scatter regression est if type==1, msymbol(d) || rcap estlo esthi regression if type==1, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(6.8 `boundarylo' "National", place(e)) text(7.2 `boundarylo' "Identity", place(e))
text(10 `boundarylo' "Cultural/religious clash", place(e)) text(5.8 `boundarylo' "Common", place(e)) text(6.2 `boundarylo' "Threat", place(e))
text(1 `boundarylo' "Conqueror's territorial aims", place(e)) text(2 `boundarylo' "Conqueror's political aims", place(e))
text(3 `boundarylo' "War duration", place(e)) text(4 `boundarylo' "Loser's pre-conquest deaths", place(e)) 
text(4.8 `boundarylo' "Loser's per capita", place(e)) text(5.2 `boundarylo' "pre-conquest deaths", place(e))
text(8 `boundarylo' "Loser's Polity score", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) ytitle("") yscale(off) ylabel(,nogrid)
;

sleep `sleeptime';

graph export robust_hm4.eps, replace;

qui sum estlo if type==2;
local boundarylo=r(min)-1;
qui sum esthi if type==2;
local boundaryhi=r(max);

scatter regression est if type==2, msymbol(d) || rcap estlo esthi regression if type==2, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(1 `boundarylo' "Terrain (Degree Mountainous)", place(e)) text(2.8 `boundarylo' "Size of occupying", place(e))
text(3.2 `boundarylo' "army", place(e)) text(2 `boundarylo' "Terrain (Mountains/Forests)", place(e))
text(3.8 `boundarylo' "Density of", place(e)) text(4.2 `boundarylo' "occupying army", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) text(8 `boundarylo' "Focal leader at large", place(e))
text(5 `boundarylo' "Intercapital Distance", place(e)) text(5.8 `boundarylo' "GDP per", place(e)) 
text(6.2 `boundarylo' "capita", place(e)) text(7 `boundarylo' "% Urban", place(e))
ytitle("") yscale(off) ylabel(,nogrid)
;

#del cr ;

graph export robust_ease4.eps, replace

sleep `sleeptime'

probit resist culclash if check==1, cluster(warnum)
eststo culrobust4a
probit resist culclash lndist if check==1, cluster(warnum)
eststo culrobust4b

reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel if check==1, cluster(warnum)
eststo robust1
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist if check==1, cluster(warnum)
eststo robust2
reg resist polity_conq lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust3
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust4

esttab robust1 robust2 robust3 robust4 using appendices.tex, tex b(a2) se l star(* .05 ** .01) mtitles("Model 1" "Model 2" "Model 3" "Model 4") title("Omitting Cases Not in Gleditsch's War List\label{tab-robust4}") nonotes addnotes("Standard errors clustered by war. \sym{*} \(p<0.05\), \sym{**} \(p<0.01\)") append

** ROBUST_6: Now for all cases in the dataset

replace check=1

foreach var in culclash terraim_s govtaim_s lndurat_s lnlosdeaths_s lnlosdeathspc_s polity_conq_s polity_los_s natl edel lndist_s terrain_s mtnfor_s lncqsize_s soldperterr_s coord gdppc_s urbpc_s {
probit resist `var' if check==1, cluster(warnum)
mat def A=e(b)
mat def B=e(V)
replace est=A[1,1] if varname=="`var'"
replace estlo=A[1,1]-invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
replace esthi=A[1,1]+invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
}

qui sum estlo if type==1
local boundarylo=r(min)-1
qui sum esthi if type==1
local boundaryhi=r(max)

#del ;
scatter regression est if type==1, msymbol(d) || rcap estlo esthi regression if type==1, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(6.8 `boundarylo' "National", place(e)) text(7.2 `boundarylo' "Identity", place(e))
text(10 `boundarylo' "Cultural/religious clash", place(e)) text(5.8 `boundarylo' "Common", place(e)) text(6.2 `boundarylo' "Threat", place(e))
text(1 `boundarylo' "Conqueror's territorial aims", place(e)) text(2 `boundarylo' "Conqueror's political aims", place(e))
text(3 `boundarylo' "War duration", place(e)) text(4 `boundarylo' "Loser's pre-conquest deaths", place(e)) 
text(4.8 `boundarylo' "Loser's per capita", place(e)) text(5.2 `boundarylo' "pre-conquest deaths", place(e))
text(8 `boundarylo' "Loser's Polity score", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) ytitle("") yscale(off) ylabel(,nogrid) 
;

sleep `sleeptime';

graph export robust_hm6.eps, replace;

qui sum estlo if type==2;
local boundarylo=r(min)-1;
qui sum esthi if type==2;
local boundaryhi=r(max);

scatter regression est if type==2, msymbol(d) || rcap estlo esthi regression if type==2, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(1 `boundarylo' "Terrain (Degree Mountainous)", place(e)) text(2.8 `boundarylo' "Size of occupying", place(e))
text(3.2 `boundarylo' "army", place(e)) text(2 `boundarylo' "Terrain (Mountains/Forests)", place(e))
text(3.8 `boundarylo' "Density of", place(e)) text(4.2 `boundarylo' "occupying army", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) text(8 `boundarylo' "Focal leader at large", place(e))
text(5 `boundarylo' "Intercapital Distance", place(e)) text(5.8 `boundarylo' "GDP per", place(e)) 
text(6.2 `boundarylo' "capita", place(e)) text(7 `boundarylo' "% Urban", place(e))
ytitle("") yscale(off) ylabel(,nogrid) 
;

#del cr ;

graph export robust_ease6.eps, replace

sleep `sleeptime'

probit resist culclash if check==1, cluster(warnum)
eststo culrobust6a
probit resist culclash lndist if check==1, cluster(warnum)
eststo culrobust6b

reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel if check==1, cluster(warnum)
eststo robust1
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist if check==1, cluster(warnum)
eststo robust2
reg resist polity_conq lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust3
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust4

esttab robust1 robust2 robust3 robust4 using appendices.tex, tex b(a2) se l star(* .05 ** .01) mtitles("Model 1" "Model 2" "Model 3" "Model 4") title("Including All Marginal Cases\label{tab-robust6}") nonotes addnotes("Standard errors clustered by war. \sym{*} \(p<0.05\), \sym{**} \(p<0.01\)") append


** ROBUST_7: Now the default analysis minus marginal conquest cases

replace check=default
replace check=0 if conqflag==1

foreach var in culclash terraim_s govtaim_s lndurat_s lnlosdeaths_s lnlosdeathspc_s polity_conq_s polity_los_s natl edel lndist_s terrain_s mtnfor_s lncqsize_s soldperterr_s coord gdppc_s urbpc_s {
probit resist `var' if check==1, cluster(warnum)
mat def A=e(b)
mat def B=e(V)
replace est=A[1,1] if varname=="`var'"
replace estlo=A[1,1]-invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
replace esthi=A[1,1]+invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
}

qui sum estlo if type==1
local boundarylo=r(min)-1
qui sum esthi if type==1
local boundaryhi=r(max)

#del ;
scatter regression est if type==1, msymbol(d) || rcap estlo esthi regression if type==1, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(6.8 `boundarylo' "National", place(e)) text(7.2 `boundarylo' "Identity", place(e))
text(10 `boundarylo' "Cultural/religious clash", place(e)) text(5.8 `boundarylo' "Common", place(e)) text(6.2 `boundarylo' "Threat", place(e))
text(1 `boundarylo' "Conqueror's territorial aims", place(e)) text(2 `boundarylo' "Conqueror's political aims", place(e))
text(3 `boundarylo' "War duration", place(e)) text(4 `boundarylo' "Loser's pre-conquest deaths", place(e)) 
text(4.8 `boundarylo' "Loser's per capita", place(e)) text(5.2 `boundarylo' "pre-conquest deaths", place(e))
text(8 `boundarylo' "Loser's Polity score", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) ytitle("") yscale(off) ylabel(,nogrid) 
;

sleep `sleeptime';

graph export robust_hm7.eps, replace;

qui sum estlo if type==2;
local boundarylo=r(min)-1;
qui sum esthi if type==2;
local boundaryhi=r(max);

scatter regression est if type==2, msymbol(d) || rcap estlo esthi regression if type==2, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(1 `boundarylo' "Terrain (Degree Mountainous)", place(e)) text(2.8 `boundarylo' "Size of occupying", place(e))
text(3.2 `boundarylo' "army", place(e)) text(2 `boundarylo' "Terrain (Mountains/Forests)", place(e))
text(3.8 `boundarylo' "Density of", place(e)) text(4.2 `boundarylo' "occupying army", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) text(8 `boundarylo' "Focal leader at large", place(e))
text(5 `boundarylo' "Intercapital Distance", place(e)) text(5.8 `boundarylo' "GDP per", place(e)) 
text(6.2 `boundarylo' "capita", place(e)) text(7 `boundarylo' "% Urban", place(e))
ytitle("") yscale(off) ylabel(,nogrid) 
;

#del cr ;

graph export robust_ease7.eps, replace

sleep `sleeptime'

probit resist culclash if check==1, cluster(warnum)
eststo culrobust7a
probit resist culclash lndist if check==1, cluster(warnum)
eststo culrobust7b

reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel if check==1, cluster(warnum)
eststo robust1
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist if check==1, cluster(warnum)
eststo robust2
reg resist polity_conq lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust3
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust4

esttab robust1 robust2 robust3 robust4 using appendices.tex, tex b(a2) se l star(* .05 ** .01) mtitles("Model 1" "Model 2" "Model 3" "Model 4") title("Omitting Marginal Cases in the Main Dataset\label{tab-robust7}") nonotes addnotes("Standard errors clustered by war. \sym{*} \(p<0.05\), \sym{**} \(p<0.01\)") append

** ROBUST_8: Now the default analysis minus cases in which a reasonable observer might argue that no conventional stage of the war occurred

replace check=default
replace check=0 if conqflag==2

foreach var in culclash terraim_s govtaim_s lndurat_s lnlosdeaths_s lnlosdeathspc_s polity_conq_s polity_los_s natl edel lndist_s terrain_s mtnfor_s lncqsize_s soldperterr_s coord gdppc_s urbpc_s {
probit resist `var' if check==1, cluster(warnum)
mat def A=e(b)
mat def B=e(V)
replace est=A[1,1] if varname=="`var'"
replace estlo=A[1,1]-invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
replace esthi=A[1,1]+invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
}

qui sum estlo if type==1
local boundarylo=r(min)-1
qui sum esthi if type==1
local boundaryhi=r(max)

#del ;
scatter regression est if type==1, msymbol(d) || rcap estlo esthi regression if type==1, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(6.8 `boundarylo' "National", place(e)) text(7.2 `boundarylo' "Identity", place(e))
text(10 `boundarylo' "Cultural/religious clash", place(e)) text(5.8 `boundarylo' "Common", place(e)) text(6.2 `boundarylo' "Threat", place(e))
text(1 `boundarylo' "Conqueror's territorial aims", place(e)) text(2 `boundarylo' "Conqueror's political aims", place(e))
text(3 `boundarylo' "War duration", place(e)) text(4 `boundarylo' "Loser's pre-conquest deaths", place(e)) 
text(4.8 `boundarylo' "Loser's per capita", place(e)) text(5.2 `boundarylo' "pre-conquest deaths", place(e))
text(8 `boundarylo' "Loser's Polity score", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) ytitle("") yscale(off) ylabel(,nogrid) 
;

sleep `sleeptime';

graph export robust_hm8.eps, replace;

qui sum estlo if type==2;
local boundarylo=r(min)-1;
qui sum esthi if type==2;
local boundaryhi=r(max);

scatter regression est if type==2, msymbol(d) || rcap estlo esthi regression if type==2, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(1 `boundarylo' "Terrain (Degree Mountainous)", place(e)) text(2.8 `boundarylo' "Size of occupying", place(e))
text(3.2 `boundarylo' "army", place(e)) text(2 `boundarylo' "Terrain (Mountains/Forests)", place(e))
text(3.8 `boundarylo' "Density of", place(e)) text(4.2 `boundarylo' "occupying army", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) text(8 `boundarylo' "Focal leader at large", place(e))
text(5 `boundarylo' "Intercapital Distance", place(e)) text(5.8 `boundarylo' "GDP per", place(e)) 
text(6.2 `boundarylo' "capita", place(e)) text(7 `boundarylo' "% Urban", place(e))
ytitle("") yscale(off) ylabel(,nogrid) 
;

#del cr ;

graph export robust_ease8.eps, replace

sleep `sleeptime'

probit resist culclash if check==1, cluster(warnum)
eststo culrobust8a
probit resist culclash lndist if check==1, cluster(warnum)
eststo culrobust8b

reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel if check==1, cluster(warnum)
eststo robust1
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist if check==1, cluster(warnum)
eststo robust2
reg resist polity_conq lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust3
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust4

esttab robust1 robust2 robust3 robust4 using appendices.tex, tex b(a2) se l star(* .05 ** .01) mtitles("Model 1" "Model 2" "Model 3" "Model 4") title("Omitting Default Cases in which Conquest May Not Have Occurred\label{tab-robust8}") nonotes addnotes("Standard errors clustered by war. \sym{*} \(p<0.05\), \sym{**} \(p<0.01\)") append

** ROBUST_9: Now for the default set of cases, but including a control for the presence of an ongoing war

replace check=default

foreach var in culclash terraim_s govtaim_s lndurat_s lnlosdeaths_s lnlosdeathspc_s polity_conq_s polity_los_s natl edel lndist_s terrain_s mtnfor_s lncqsize_s soldperterr_s coord gdppc_s urbpc_s {
probit resist `var' ongoing if check==1, cluster(warnum)
mat def A=e(b)
mat def B=e(V)
replace est=A[1,1] if varname=="`var'"
replace estlo=A[1,1]-invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
replace esthi=A[1,1]+invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
}

qui sum estlo if type==1
local boundarylo=r(min)-1
qui sum esthi if type==1
local boundaryhi=r(max)

#del ;
scatter regression est if type==1, msymbol(d) || rcap estlo esthi regression if type==1, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(6.8 `boundarylo' "National", place(e)) text(7.2 `boundarylo' "Identity", place(e))
text(10 `boundarylo' "Cultural/religious clash", place(e)) text(5.8 `boundarylo' "Common", place(e)) text(6.2 `boundarylo' "Threat", place(e))
text(1 `boundarylo' "Conqueror's territorial aims", place(e)) text(2 `boundarylo' "Conqueror's political aims", place(e))
text(3 `boundarylo' "War duration", place(e)) text(4 `boundarylo' "Loser's pre-conquest deaths", place(e)) 
text(4.8 `boundarylo' "Loser's per capita", place(e)) text(5.2 `boundarylo' "pre-conquest deaths", place(e))
text(8 `boundarylo' "Loser's Polity score", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) ytitle("") yscale(off) ylabel(,nogrid) 
;

sleep `sleeptime';

graph export robust_hm9.eps, replace;

qui sum estlo if type==2;
local boundarylo=r(min)-1;
qui sum esthi if type==2;
local boundaryhi=r(max);

scatter regression est if type==2, msymbol(d) || rcap estlo esthi regression if type==2, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(1 `boundarylo' "Terrain (Degree Mountainous)", place(e)) text(2.8 `boundarylo' "Size of occupying", place(e))
text(3.2 `boundarylo' "army", place(e)) text(2 `boundarylo' "Terrain (Mountains/Forests)", place(e))
text(3.8 `boundarylo' "Density of", place(e)) text(4.2 `boundarylo' "occupying army", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) text(8 `boundarylo' "Focal leader at large", place(e))
text(5 `boundarylo' "Intercapital Distance", place(e)) text(5.8 `boundarylo' "GDP per", place(e)) 
text(6.2 `boundarylo' "capita", place(e)) text(7 `boundarylo' "% Urban", place(e))
ytitle("") yscale(off) ylabel(,nogrid) 
;

#del cr ;

graph export robust_ease9.eps, replace

sleep `sleeptime'

probit resist culclash ongoing if check==1, cluster(warnum)
eststo culrobust9a
probit resist culclash lndist ongoing if check==1, cluster(warnum)
eststo culrobust9b

reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel ongoing if check==1, cluster(warnum)
eststo robust1
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist ongoing if check==1, cluster(warnum)
eststo robust2
reg resist polity_conq lndist terrain_alt soldperterr coord gdppc2_alt ongoing if check==1, cluster(warnum)
eststo robust3
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist terrain_alt soldperterr coord gdppc2_alt ongoing if check==1, cluster(warnum)
eststo robust4

esttab robust1 robust2 robust3 robust4 using appendices.tex, tex b(a2) se l star(* .05 ** .01) mtitles("Model 1" "Model 2" "Model 3" "Model 4") title("Including a Control for Ongoing War\label{tab-robust9}") nonotes addnotes("Standard errors clustered by war. \sym{*} \(p<0.05\), \sym{**} \(p<0.01\)") append

** ROBUST_10: Default set of cases, coding Poland in World War II as experiencing resistance

replace resist=1 if loser=="Poland"

foreach var in culclash terraim_s govtaim_s lndurat_s lnlosdeaths_s lnlosdeathspc_s polity_conq_s polity_los_s natl edel lndist_s terrain_s mtnfor_s lncqsize_s soldperterr_s coord gdppc_s urbpc_s {
probit resist `var' if check==1, cluster(warnum)
mat def A=e(b)
mat def B=e(V)
replace est=A[1,1] if varname=="`var'"
replace estlo=A[1,1]-invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
replace esthi=A[1,1]+invnormal(1-`siglev'/2)*sqrt(B[1,1]) if varname=="`var'"
}

qui sum estlo if type==1
local boundarylo=r(min)-1
qui sum esthi if type==1
local boundaryhi=r(max)

#del ;
scatter regression est if type==1, msymbol(d) || rcap estlo esthi regression if type==1, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(6.8 `boundarylo' "National", place(e)) text(7.2 `boundarylo' "Identity", place(e))
text(10 `boundarylo' "Cultural/religious clash", place(e)) text(5.8 `boundarylo' "Common", place(e)) text(6.2 `boundarylo' "Threat", place(e))
text(1 `boundarylo' "Conqueror's territorial aims", place(e)) text(2 `boundarylo' "Conqueror's political aims", place(e))
text(3 `boundarylo' "War duration", place(e)) text(4 `boundarylo' "Loser's pre-conquest deaths", place(e)) 
text(4.8 `boundarylo' "Loser's per capita", place(e)) text(5.2 `boundarylo' "pre-conquest deaths", place(e))
text(8 `boundarylo' "Loser's Polity score", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) ytitle("") yscale(off) ylabel(,nogrid)
;

sleep `sleeptime';

graph export robust_hm10.eps, replace;

qui sum estlo if type==2;
local boundarylo=r(min)-1;
qui sum esthi if type==2;
local boundaryhi=r(max);

scatter regression est if type==2, msymbol(d) || rcap estlo esthi regression if type==2, 
horizontal xline(0) xtitle("Confidence Intervals") graphregion(fcolor(white))
yscale(reverse) xscale(range(`boundarylo' `boundaryhi')) xlabel(-2(1)2) legend(off)
text(1 `boundarylo' "Terrain (Degree Mountainous)", place(e)) text(2.8 `boundarylo' "Size of occupying", place(e))
text(3.2 `boundarylo' "army", place(e)) text(2 `boundarylo' "Terrain (Mountains/Forests)", place(e))
text(3.8 `boundarylo' "Density of", place(e)) text(4.2 `boundarylo' "occupying army", place(e))
text(9 `boundarylo' "Conqueror's Polity score", place(e)) text(8 `boundarylo' "Focal leader at large", place(e))
text(5 `boundarylo' "Intercapital Distance", place(e)) text(5.8 `boundarylo' "GDP per", place(e)) 
text(6.2 `boundarylo' "capita", place(e)) text(7 `boundarylo' "% Urban", place(e))
ytitle("") yscale(off) ylabel(,nogrid)
;

#del cr ;

graph export robust_ease10.eps, replace

sleep `sleeptime'

probit resist culclash if check==1, cluster(warnum)
eststo culrobust10a
probit resist culclash lndist if check==1, cluster(warnum)
eststo culrobust10b

reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel if check==1, cluster(warnum)
eststo robust1
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist if check==1, cluster(warnum)
eststo robust2
reg resist polity_conq lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust3
reg resist culclash terraim lnlosdeaths polity_conq polity_los natl edel lndist terrain_alt soldperterr coord gdppc2_alt if check==1, cluster(warnum)
eststo robust4

esttab robust1 robust2 robust3 robust4 using appendices.tex, tex b(a2) se l star(* .05 ** .01) mtitles("Model 1" "Model 2" "Model 3" "Model 4") title("Coding Poland in WWII as Experiencing Resistance\label{tab-robust10}") nonotes addnotes("Standard errors clustered by war. \sym{*} \(p<0.05\), \sym{**} \(p<0.01\)") append

replace resist=0 if loser=="Poland"

esttab culrobust1a culrobust1b culrobust2a culrobust2b culrobust3a culrobust3b using appendices.tex, tex b(a2) se l star(* .05 ** .01) mtitles("Model 1" "Model 2" "Model 3" "Model 4") title("Cultural Robustness Checks (Part 1)\label{tab-culrobust1}") nonotes addnotes("Standard errors clustered by war. \sym{*} \(p<0.05\), \sym{**} \(p<0.01\)") append
esttab culrobust4a culrobust4b culrobust6a culrobust6b culrobust7a culrobust7b using appendices.tex, tex b(a2) se l star(* .05 ** .01) mtitles("Model 1" "Model 2" "Model 3" "Model 4") title("Cultural Robustness Checks (Part 2)\label{tab-culrobust2}") nonotes addnotes("Standard errors clustered by war. \sym{*} \(p<0.05\), \sym{**} \(p<0.01\)") append
esttab culrobust8a culrobust8b culrobust9a culrobust9b culrobust10a culrobust10b using appendices.tex, tex b(a2) se l star(* .05 ** .01) mtitles("Model 1" "Model 2" "Model 3" "Model 4") title("Cultural Robustness Checks (Part 3)\label{tab-culrobust3}") nonotes addnotes("Standard errors clustered by war. \sym{*} \(p<0.05\), \sym{**} \(p<0.01\)") append

** I'm also going to run crosstabs, which will go in the appendix

** generating crosstabs

** for categorical variables, I report crosstabs with Fisher's Exact Test.  For continuous variables
** (and categorical variables with more than five values, like Polity) I report crosstabs after 
** collapsing variables into categories

** HM variables are aims, destruction, democracy, nationalism, culclash, edelstein
** ease variables are terrain, occupation density, coord, distance, and conqueror regime (above)

** First generate categorical variables where necessary

foreach var in lnlosdeaths lnlosdeathspc durat terrain soldperterr distance gdppc urbpc {
centile `var' if default==1, c(25 50 75)
gen `var'_col=0
replace `var'_col=1 if `var'>r(c_1)
replace `var'_col=2 if `var'>r(c_2)
replace `var'_col=3 if `var'>r(c_3)
replace `var'_col=. if `var'==.
}

gen polity_conq_col=0
replace polity_conq_col=1 if polity_conq>=7
replace polity_conq_col=. if polity_conq==.
gen polity_los_col=0
replace polity_los_col=1 if polity_los>=7
replace polity_los_col=. if polity_los==.


foreach var in terraim govtaim lnlosdeaths_col lnlosdeathspc_col durat_col natl edel culclash polity_conq_col polity_los_col terrain_col soldperterr_col coord distance_col gdppc_col urbpc_col {
tab resist `var' if default==1, e
}




log close
